using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class system_parameterMap : EntityTypeConfiguration<system_parameter>
    {
        public system_parameterMap()
        {
            // Primary Key
            this.HasKey(t => t.para_id);

            // Properties
            this.Property(t => t.parse_type)
                .HasMaxLength(32);

            this.Property(t => t.para_name)
                .HasMaxLength(50);

            this.Property(t => t.para_name_en_US)
                .HasMaxLength(50);

            this.Property(t => t.parse_type_en_US)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("system_parameter");
            this.Property(t => t.parse_type).HasColumnName("parse_type");
            this.Property(t => t.para_id).HasColumnName("para_id");
            this.Property(t => t.para_name).HasColumnName("para_name");
            this.Property(t => t.disable_flag).HasColumnName("disable_flag");
            this.Property(t => t.para_seq).HasColumnName("para_seq");
            this.Property(t => t.para_name_en_US).HasColumnName("para_name!en-US");
            this.Property(t => t.parse_type_en_US).HasColumnName("parse_type!en-US");
        }
    }
}
